package com.jna.unrar.bean;

import com.sun.jna.Structure;

import java.util.Arrays;
import java.util.List;

public class RARHeaderDataEx extends Structure {
    public  byte[] ArcName=new byte[1024];
    public  byte[] ArcNameW=new byte[1024];
    public  byte[] FileName=new byte[1024];
    public  byte[] FileNameW=new byte[1024];
    public  int Flags;
    public  int PackSize;
    public  int PackSizeHigh;
    public  int UnpSize;
    public  int UnpSizeHigh;
    public  int HostOS;
    public  int FileCRC;
    public  int FileTime;
    public  int UnpVer;
    public  int Method;
    public  int FileAttr;
    public  String CmtBuf;
    public  int CmtBufSize;
    public  int CmtSize;
    public  int CmtState;
    public  int DictSize;
    public  int HashType;
    public  String Hash;
    public  int RedirType;
    public  String RedirName;
    public  int RedirNameSize;
    public  int DirTarget;
    public  int MtimeLow;
    public  int MtimeHigh;
    public  int CtimeLow;
    public  int CtimeHigh;
    public  int AtimeLow;
    public  int AtimeHigh;
    public  int Reserved[] = new int[988];

    @Override
    protected List<String> getFieldOrder() {
        return Arrays.asList(new String[]{
                "ArcName",
                "ArcNameW",
                "FileName",
                "FileNameW",
                "Flags",
                "PackSize",
                "PackSizeHigh",
                "UnpSize",
                "UnpSizeHigh",
                "HostOS",
                "FileCRC",
                "FileTime",
                "UnpVer",
                "Method",
                "FileAttr",
                "CmtBuf",
                "CmtBufSize",
                "CmtSize",
                "CmtState",
                "DictSize",
                "HashType",
                "Hash",
                "RedirType",
                "RedirName",
                "RedirNameSize",
                "DirTarget",
                "MtimeLow",
                "MtimeHigh",
                "CtimeLow",
                "CtimeHigh",
                "AtimeLow",
                "AtimeHigh",
                "Reserved"
        });
    }
}
